package cily.utils 
{
	import flash.system.Capabilities;
	/**
	 * ...
	 * @author 
	 */
	public class PathUtil
	{
		
		public function PathUtil() 
		{
			
		}
		
		public static function resolveBinding(path:String , p_width : Number):String
		{
			var start:int = path.indexOf("{");
			if (start == -1)
			{
				return path;
			}
			var end:int = path.indexOf("}");
			var expression:String = path.substring(start + 1, end);
			var before:String = path.substring(0, start);
			var after:String = path.substr(end + 1);
			var resolved:String = "";
			
		
			
			var screenX:Number = p_width;
			//var screenY:Number = Capabilities.screenResolutionY;
			var rep:String;
			
			if (screenX >1600)
				rep="1900";
			else if (screenX >1280)
				rep="1600";
			else 
				rep = "1280";
				
			resolved = before + rep + after;
			
			return resolved;
		}
		
	}

}